display OS in existing partitions

Bug #1100694 reported by kobe
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

This is used for a Chinese customized release named "UbuntuKylin" . We want to display system already installed on a partition on the advanced partitioning page of ubiquity.

In Ubuntu 13.04 and the previous versions, the advanced partitioning page only display six contents, they are device_name, partition_type, mountpoint, format, partition_size and partition_size_used.

In order to know the existing partitions are what the systems better, UbuntuKylin need to add the content of existing OS after the above six contents.

ProblemType: Requirement for UbuntuKylin(Bug)
DistroRelease: Ubuntu 13.04
Package: ubiquity_2.13.9
ProcVersionSignature: Ubuntu 3.8.0-0-generic
Uname: Linux 3.8.0-0-generic i686
Date: Thu, 17 Jan 2013 17:22:30

Tags: patch

Related branches

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

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

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
kobe (kobe24-lixiang) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "the patch file of displaying existing os" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in ubiquity (Ubuntu):
assignee: nobody → Dmitrijs Ledkovs (xnox)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Hello,

Thank you very much for submitting your patch. The proposed
feature - showing detected file systems in the advanced
partitioner table is very nice and useful.

One question, does /dev/sda1 always stay as "Windows", even if it
was already marked to be formatted and used by the new
installation? I.e. is there a way to "expire" the
misc.grub_options? Although that's a corner case and gets more
tricky if partman changes are applied & reverted.

Here are some further comments about the patch & structure.

Usually, we don't use global variables like the introduced
GRUB_OPTIONS to store state or pass data around. (The other
defined global variables are constants).

For example, since all of this is happening in the PageGtk
object, one can store misc.grub_options() in
self.grub_options_cache. And simply use that when generating the
table view.

Please don't include #----start/end--- markers, as they are
redundant. The provided patch already clearly shows your changes.

You may find it useful to use bzr to branch lp:ubiquity source
code, and then push branches back to launchpad and create merge
proposals. That way one doesn't need to maintain patches of their
own. For example see this recent merge proposal [1]. Further
documentation on how to download a branch, push your changes back
and make a merge proposal can be found here [2].

Once again. Thank you for your idea and patch to implement it.

[1] https://code.launchpad.net/~laney/ubiquity/webcam-gst-1.0/+merge/143136

[2] https://help.launchpad.net/Code

Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Jack Yu (jackyu) wrote :

Hi Dmitrijs, thanks for your useful response. I don't think '/dev/sda1' always stay as "Windows".
OK, we (kobe and I) will create a branch asap and ask you merge when ready.

Revision history for this message
kobe (kobe24-lixiang) wrote : Re:[Bug 1100694] Re: display OS in existing partitions
Download full text (4.2 KiB)

Hi Dmitrijs,
Thanks for your suggestionsand response. I had tried to obtain the grub information to display OS in exsting partitions timely , but because the response of function named "partman_column_syst" was too much, It led to the partition to die. That is why I use the global variables named "GRUB_OPTIONS". You can see the function in my patch uploaded to launchpad. If I use (1) to display OS, partition will die. So I use (2) to finish it. Like this:

 def partman_column_syst(self, unused_column, cell, model, iterator,
                          user_data):
        if not model[iterator][1]:
           return
        partition = model[iterator][1]
        #options = misc.grub_options() (1)
        global GRUB_OPTIONS
        options = GRUB_OPTIONS (2)
        if 'id' not in partition:
            cell.set_property('text', '')
        elif (partition['parted']['fs'] != 'free'
                and partition['parted']['fs'] != 'linux-swap'):
            for opt in options:
                if partition['parted']['path'] in opt:
                    cell.set_property('text', '%s' % opt[1])
        elif partition['parted']['type'] == 'unusable':
            cell.set_property('text', '')
        else:
            cell.set_property('text', '')

Next, I will try another way, maybe I need more time to analysis, and I need you give me some suggestions about this. Thank you.

At 2013-01-21 18:10:24,"Dmitrijs Ledkovs" <email address hidden> wrote:
>Hello,
>
>Thank you very much for submitting your patch. The proposed
>feature - showing detected file systems in the advanced
>partitioner table is very nice and useful.
>
>One question, does /dev/sda1 always stay as "Windows", even if it
>was already marked to be formatted and used by the new
>installation? I.e. is there a way to "expire" the
>misc.grub_options? Although that's a corner case and gets more
>tricky if partman changes are applied & reverted.
>
>Here are some further comments about the patch & structure.
>
>Usually, we don't use global variables like the introduced
>GRUB_OPTIONS to store state or pass data around. (The other
>defined global variables are constants).
>
>For example, since all of this is happening in the PageGtk
>object, one can store misc.grub_options() in
>self.grub_options_cache. And simply use that when generating the
>table view.
>
>Please don't include #----start/end--- markers, as they are
>redundant. The provided patch already clearly shows your changes.
>
>You may find it useful to use bzr to branch lp:ubiquity source
>code, and then push branches back to launchpad and create merge
>proposals. That way one doesn't need to maintain patches of their
>own. For example see this recent merge proposal [1]. Further
>documentation on how to download a branch, push your changes back
>and make a merge proposal can be found here [2].
>
>Once again. Thank you for your idea and patch to implement it.
>
>[1] https://code.launchpad.net/~laney/ubiquity/webcam-
>gst-1.0/+merge/143136
>
>[2] https://help.launchpad.net/Code
>
>** Changed in: ubiquity (Ubuntu)
> Importance: Undecided => Medium
>
>--
>You received this bug notification because you...

Read more...

Revision history for this message
kobe (kobe24-lixiang) wrote :

change a way to show OS in existing partitions.
 In ubi-partman.py, I defined a list to save grub in "__init__" function in the Class named "PageGtk". It is :
self.grub_options = []
The attachment is my patch file.

Revision history for this message
Jack Yu (jackyu) wrote :

Hi Dmitrijs, we created a branch at https://code.launchpad.net/~ubuntukylin-members/ubiquity/showos.

As kobe said, we used global variable to avoid frequently access the information of grub, which leads to use out of CPU. Currently, we want to use a local variable, and refresh its value whenever enter this selection to record partman changes.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Yes, calling grub_options continuously would use a lot of CPU time.
I have clicked "Proposed for merging" on your branch. Launchpad will generate a diff for me soon.

Revision history for this message
Jack Yu (jackyu) wrote :

Thank you. Please let us know asap if you have any suggestions.

Changed in ubiquity (Ubuntu):
status: Confirmed → Fix Committed
assignee: Dmitrijs Ledkovs (xnox) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.13.13

---------------
ubiquity (2.13.13) raring; urgency=low

  [ Dmitrijs Ledkovs ]
  * Bump Standards version and override some lintian tags (ubiquity is
    weird).
  * Override expander style, which is hardcoded in light-themes to a
    light color. (LP: #1100922)
  * Consolidate CssProvider and add make minimal progress bar width 10px,
    in preparation for dot-progress of all steps.
  * Fix colour unit test, the green is no longer what it used to be...
  * Switch to "NotShowIn=KDE" for ubiquity-gtk desktop files, as most !kde
    desktop environments use gtk frontend.
  * Show progress dots for plugin pages and show progress bar only during
    slideshow.

  [ Colin Watson ]
  * Decode the output of apt_pkg.size_to_str() if necessary when
    substituting it into Unicode strings (LP: #877756, #1132918).
  * Update translations from Launchpad.

  [ Aurélien Gâteau ]
  * Turns the Ubiquity KDE window into a regular window and rework
    the layout of widgets to provide more space to the main content.
    The labels on the left now wrap to the next line if they are too long,
    ensuring they are never truncated.
  * KDE: Improve the layout of Prepare step
  * KDE: fix integration of the webview responsible for showing the slideshow
  * KDE: fix various issues with right-to-left languages

  [ Julien Lavergne ]
  * Use feh to draw the wallpaper on Lubuntu when using ubiquity-dm.

  [ Ma Jun (Kylin Team) ]
  * Fix referencing variable before assignment (LP: #945027)

  [ Kobe Lee ]
  * Show OS column in manual partitioning page. (LP: #1100694)

  [ Stéphane Graber ]
  * Fix crash in ubi-console-setup when quickly moving back and worth between
    pages. (LP: #944614)

  [ Jonathan Riddell ]
  * Add back compositing to kwin on live CD (in ubiquity-dm), whatever was wrong
    in 2008 should be fixed now and its making us look ugly
 -- Dmitrijs Ledkovs <email address hidden> Thu, 07 Mar 2013 19:53:52 +0000

Changed in ubiquity (Ubuntu):
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.