"el complete" in langpacks.txt breaks build

Bug #1048207 reported by Alkis Georgopoulos
16
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ubuntu-defaults-builder (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned

Bug Description

langpacks.txt mentions this about "complete":
# If the second
# column is "complete", all additional support packages like LibreOffice help,
# input methods, dictionaries etc. will be installed in addition; otherwise
# only the language packs with the translations will be installed.

But when I put "el complete" there, `ubuntu-defaults-image` breaks.
The problem is in /usr/share/ubuntu-defaults-builder/language-support-hook:

> requested=`sed "s/ complete/(complete)/" < "$REQUESTED_LANGUAGES" | xargs`
>
> # determine installed packages for requested languages
> for lang in $requested; do
> check-language-support --show-installed -l $lang | xargs -n1 >> $NOREMOVE_PACKAGES
> done

This results in the following call, which is clearly wrong:
> check-language-support --show-installed -l 'el(complete)'

I'm attaching an untested patch that might fix the problem.

Tags: patch
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-defaults-builder (Ubuntu):
status: New → Confirmed
tags: added: patch
Revision history for this message
Martin Pitt (pitti) wrote :

-requested=`sed "s/ complete/(complete)/" < "$REQUESTED_LANGUAGES" | xargs`
+requested=`sed "s/ complete//" < "$REQUESTED_LANGUAGES" | xargs`

This will just entirely ignore the "complete" flag and thus break this functionality.

-done
+done < "$REQUESTED_LANGUAGES"

I don't think that works -- that's a variable with the list of languages, not a file. The < operator redirects stdin from a file only, not from a variable.

tags: removed: patch
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

pitti, first of all I tried it and it works.

> This will just entirely ignore the "complete" flag and thus break this functionality.

It will ignore it only while calling check-language-support. It needs to ignore it there, as check-language-support doesn't support "complete" parameters. The "complete" parameter is only used in the while loop starting at line 52.

> I don't think that works -- that's a variable with the list of languages, not a file.

It's a file:
$ grep ^REQUESTED_LANGUAGES ubuntu-defaults-builder-0.31/lib/language-support-hook
REQUESTED_LANGUAGES=/usr/share/#DEFAULTS_PACKAGE#/langpacks.txt

$ cat chroot/usr/share/ubuntu-defaults-el-gr/langpacks.txt
el complete

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

Sorry, I mis-read the patch. Tagging as patch again, will apply soon. Thanks!

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

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

---------------
ubuntu-defaults-builder (0.37) quantal; urgency=low

  * lib/language-support-hook: Fix handling of "complete" lines. Thanks Alkis
      Georgopoulos! (LP: #1048207)
 -- Martin Pitt <email address hidden> Mon, 10 Sep 2012 09:47:21 +0200

Changed in ubuntu-defaults-builder (Ubuntu):
status: Confirmed → Fix Released
Martin Pitt (pitti)
Changed in ubuntu-defaults-builder (Ubuntu Precise):
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
Changed in ubuntu-defaults-builder (Ubuntu Precise):
status: In Progress → Triaged
assignee: Martin Pitt (pitti) → nobody
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in ubuntu-defaults-builder (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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