Navigation Menu

Skip to content

Commit

Permalink
Do proper rnd/release handling; use lowercase name for searching part…
Browse files Browse the repository at this point in the history
…ition files
  • Loading branch information
Bernd Wachter committed Apr 1, 2013
1 parent 2bf098f commit 3fa956b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
6 changes: 1 addition & 5 deletions libssu/ssurepomanager.cpp
Expand Up @@ -183,11 +183,7 @@ QString SsuRepoManager::url(QString repoName, bool rndRepo,
QSettings *repoSettings = new QSettings(SSU_REPO_CONFIGURATION, QSettings::IniFormat);
SsuDeviceInfo deviceInfo;

//errorFlag = false;

settings->sync();

// fill in all arbitrary variables from ssu.inie
// fill in all arbitrary variables from ssu.ini
var.resolveSection(settings, "repository-url-variables", &repoParameters);

// add/overwrite some of the variables with sane ones
Expand Down
4 changes: 4 additions & 0 deletions rpm/ssu.changes
@@ -1,3 +1,7 @@
* Mon Apr 01 2013 Bernd Wachter <bernd.wachter@jollamobile.com> - 0.29.1
- Do proper handling of rnd/release modes
- Lowercase model names before searching for partition configuration

* Mon Apr 01 2013 Bernd Wachter <bernd.wachter@jollamobile.com> - 0.29
- Add prototype kickstart generator

Expand Down
2 changes: 1 addition & 1 deletion rpm/ssu.spec
@@ -1,5 +1,5 @@
Name: ssu
Version: 0.29
Version: 0.29.1
Release: 1
Summary: SSU enabler for RND
Group: System/Base
Expand Down
24 changes: 18 additions & 6 deletions ssuks/ssukickstarter.cpp
Expand Up @@ -97,10 +97,10 @@ QStringList SsuKickstarter::partitions(){

QDir dir(QString("%1/kickstart/part/").arg(SSU_DATA_DIR));

if (dir.exists(deviceInfo.deviceVariant(true)))
partitionFile = deviceInfo.deviceVariant(true);
else if (dir.exists(deviceModel))
partitionFile = deviceModel;
if (dir.exists(deviceModel.toLower()))
partitionFile = deviceModel.toLower();
else if (dir.exists(deviceInfo.deviceVariant(true).toLower()))
partitionFile = deviceInfo.deviceVariant(true).toLower();
else if (dir.exists("default"))
partitionFile = "default";
else {
Expand Down Expand Up @@ -193,13 +193,25 @@ void SsuKickstarter::write(QString kickstart){
it++;
}

if (repoOverride.contains("rnd")){
if (repoOverride.value("rnd") == "true")
rndMode = true;
else if (repoOverride.value("rnd") == "false")
rndMode = false;
}

// in rnd mode both rndRelease an release should be the same,
// as the variable name used is %(release)
if (rndMode && repoOverride.contains("rndRelease"))
repoOverride.insert("release", repoOverride.value("rndRelease"));

kout << commands().join("\n") << endl << endl;
kout << partitions().join("\n") << endl << endl;
kout << repos().join("\n") << endl << endl;
kout << packages().join("\n") << endl << endl;
kout << scriptletSection("pre", false).join("\n") << endl << endl;
kout << scriptletSection("post").join("\n") << endl << endl;
kout << scriptletSection("post").join("\n") << endl << endl;
kout << scriptletSection("post", true).join("\n") << endl << endl;
kout << scriptletSection("post", false).join("\n") << endl << endl;
// add flags as bitmask?
// POST, die-on-error
}

0 comments on commit 3fa956b

Please sign in to comment.