Ignores last line in i18n/langpacks.txt

Bug #1070523 reported by Csaba Pető
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-defaults-builder (Ubuntu)
Fix Released
Undecided
Unassigned
Quantal
Fix Released
High
Martin Pitt
Raring
Fix Released
Undecided
Unassigned

Bug Description

The created ISO file does not contain Hungarian packages.
I use this config: http://bazaar.launchpad.net/~ubuntu-defaults-hu-team/ubuntu-defaults-hu/trunk/files

Build log: http://paste.ubuntu.com/1300848/

ubuntu-defaults-builder 0.44

FIX: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/raring/ubuntu-defaults-builder/raring/revision/168

TEST CASE:
 * Create an ubuntu-defaults configuration with i18n/langpacks.txt and put one langpack into it, like the package from above bzr branch. Build the binary package.
 * Build an image using ubuntu-defaults-image --package /path/to/your/ubuntu-defaults-hu.deb
 * Observe that the language pack is not actually on the generated .iso. With the -proposed version, the iso should have that language pack and no others.

REGRESSION POTENTIAL: This uses a fairly standard shell technique to append a newline to the "cat"ing of a file, to make the "read" command recognize the last line, too. The worst case of breaking lib/language-support-hook is that image generation succeeds, but the generated image has only the default language packs (such as English, Portugese, etc.) on it but not the actually requested ones. It has been tested to work, though.

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed it seems to see the configuration and that hu should be installed:
requested: hu
installed: de en es pt zh-hans
to remove: de en es pt zh-hans

It removes the languages just fine, but it doesn't do any attempt to install them:
[...]
Removing language-pack-gnome-zh-hans ...
Removing language-pack-zh-hans ...
Processing triggers for software-center ...
INFO:softwarecenter.db.update:no translation information in database needed
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
P: Language support configuration done.

Revision history for this message
Martin Pitt (pitti) wrote :

It seems the problem is that /usr/share/ubuntu-defaults-hu/langpacks.txt does not end with a CR, the while loop to read it doesn't seem to like this and ignores the line.

As an immediate workaround, add "en" to the end of i18n/langpacks.txt. It seems this will be ignored then, but it should add the Hungarian langpacks then.

summary: - Cannot build localized Quantal ISO with Hungarian settings
+ Ignores last line in i18n/langpacks.txt
Revision history for this message
Martin Pitt (pitti) wrote :

Fix pushed into quantal-proposed review queue. As this package is Arch:all, it can be forward-copied to raring as well once verification is complete.

Changed in ubuntu-defaults-builder (Ubuntu Quantal):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Fix Committed
Changed in ubuntu-defaults-builder (Ubuntu Raring):
status: New → Fix Committed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Martin! This bug lacks a Test Case and Regression Potential. Please add those so that we can accept it into quantal-proposed, as the patch looks good.

Martin Pitt (pitti)
description: updated
Revision history for this message
Colin Watson (cjwatson) wrote : Please test proposed package

Hello Csaba, or anyone else affected,

Accepted ubuntu-defaults-builder into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-defaults-builder/0.45 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-defaults-builder - 0.46

---------------
ubuntu-defaults-builder (0.46) raring; urgency=low

  * Move the signed kernel to binary/casper/vmlinuz.efi, to fit within 8.3
    restrictions for isolinux.

ubuntu-defaults-builder (0.45) quantal-proposed; urgency=low

  * lib/language-support-hook: langpacks.txt's last line is not usually
    terminated with a CR. Always append a CR to it after cat'ing, to ensure
    that the read loop sees the last line. This fixes the ignoring of
    languages in i18n/langpacks.txt. (LP: #1070523)
 -- Colin Watson <email address hidden> Mon, 12 Nov 2012 15:39:39 +0000

Changed in ubuntu-defaults-builder (Ubuntu Raring):
status: Fix Committed → Fix Released
Csaba Pető (phace)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-defaults-builder - 0.45

---------------
ubuntu-defaults-builder (0.45) quantal-proposed; urgency=low

  * lib/language-support-hook: langpacks.txt's last line is not usually
    terminated with a CR. Always append a CR to it after cat'ing, to ensure
    that the read loop sees the last line. This fixes the ignoring of
    languages in i18n/langpacks.txt. (LP: #1070523)
 -- Martin Pitt <email address hidden> Fri, 26 Oct 2012 08:22:11 +0200

Changed in ubuntu-defaults-builder (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.