[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

schleuder packaging: Searching for input to run the tests



Hi all,

As announced a while ago, I'm currently packaging schleuder, a GPG
enabled mailing list manager. I'm nearly finished, and worked a lot with
upstream these last days to fix various issues. 

For the moment I'm facing one last showstopper: There is one last
hardcoded path inside the upstream code [1] which defines the locales
dir path. I've tried to come up with a clever idea what to do with this
for the last day but failed; so I'm searching for input and your
collective wisdom now.

If I'm leaving this untouched / unpatched, 
/usr/bin/ruby2.3 /usr/bin/gem2deb-test-runner 
if called during the package build works. Great!

However, running 
gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 
against the installed package fails obviously, the path is wrong at this
time. because I'm installing the locales into /usr/share/schleuder/.

One idea we came up with is the following:

	Patch the upstream src:

	locales_dir = Dir["#{rootdir}/locales/*.yml"]

	if ENV['SCHLEUDER_LOCALES_DIR']:
	locales_dir = ENV['SCHLEUDER_LOCALES_DIR']

	I18n.load_path += locales_dir

	--

	Debian src:

	Using quilt:
	- locales_dir = Dir["#{rootdir}/locales/*.yml"]
	+ locales_dir = Dir["/usr/share/schleuder/locales/*.yml"]

	debian/ruby-tests.rake:
	ENV['SCHLEUDER_LOCALES_DIR'] = Dir["#{rootdir}/locales/*.yml"]
	if Dir.exists?('/etc/schleuder')
	ENV['SCHLEUDER_LOCALES_DIR'] = nil

Of course I'm happy to hear about different approaches, etc.

Thanks in advance and all the best,
Georg


[1] https://git.codecoop.org/schleuder/schleuder3/blob/master/lib/schleuder.rb#L75

Attachment: signature.asc
Description: Digital signature


Reply to: