Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-defaults
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
python-defaults
Commits
2d6c1797
Commit
2d6c1797
authored
13 years ago
by
Piotr Ożarowski
Browse files
Options
Downloads
Patches
Plain Diff
really fix removing .so.foo symlinks twice issue
parent
05b047f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dh_python2
+7
-6
7 additions, 6 deletions
dh_python2
with
7 additions
and
6 deletions
dh_python2
+
7
−
6
View file @
2d6c1797
...
...
@@ -375,13 +375,17 @@ def scan(package, dname=None, clean_dbg_pkg=True):
continue
# check files
for
fn
in
file_names
:
for
fn
in
sorted
(
file_names
):
# sorted() to make sure .so files are handled before .so.foo
fpath
=
join
(
root
,
fn
)
if
not
exists
(
fpath
):
# could be removed while handling .so symlinks
continue
fext
=
fn
.
rsplit
(
'
.
'
,
1
)[
-
1
]
if
fext
in
(
'
pyc
'
,
'
pyo
'
):
os
.
remove
(
join
(
root
,
fn
)
)
os
.
remove
(
fpath
)
continue
if
public_dir
:
fpath
=
join
(
root
,
fn
)
if
fext
==
'
so
'
and
islink
(
fpath
):
dstfpath
=
fpath
links
=
set
()
...
...
@@ -393,8 +397,6 @@ def scan(package, dname=None, clean_dbg_pkg=True):
for
lpath
in
links
:
log
.
info
(
'
removing symlink: %s
'
,
lpath
)
os
.
remove
(
lpath
)
if
split
(
lpath
)[
-
1
]
!=
fn
:
file_names
.
remove
(
split
(
lpath
)[
-
1
])
log
.
info
(
'
renaming %s to %s
'
,
dstfpath
,
fn
)
os
.
rename
(
dstfpath
,
fpath
)
if
dbg_package
and
clean_dbg_pkg
and
fext
not
in
(
'
so
'
,
'
h
'
):
...
...
@@ -445,7 +447,6 @@ def scan(package, dname=None, clean_dbg_pkg=True):
continue
# search for scripts in bin dirs
if
bin_dir
:
fpath
=
join
(
root
,
fn
)
res
=
shebang2pyver
(
fpath
)
if
res
:
r
[
'
shebangs
'
].
add
(
res
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment