Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix udev rule filename(s) #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions stdeb/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1468,8 +1468,12 @@ def build_dsc(debinfo,
fname = debinfo.udev_rules
if not os.path.exists(fname):
raise ValueError('udev rules file specified, but does not exist')
link_func(fname,
os.path.join(debian_dir, '%s.udev' % debinfo.package))
if debinfo.with_python2:
link_func(fname,
os.path.join(debian_dir, '%s.udev' % debinfo.package))
if debinfo.with_python3:
link_func(fname,
os.path.join(debian_dir, '%s.udev' % debinfo.package3))
Comment on lines -1471 to +1476
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked how this will behave when both with_python2 and with_python3 are true? Does it create issues if the udev rules are linked under both package names?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried this and it works fine; the udev rule file actually has to be present twice (with prefix python- and python3-) in that case to be picked up by both the Python 2 and 3 package.


# J. debian/source/format
os.mkdir(os.path.join(debian_dir, 'source'))
Expand Down