fix: multiple packagechooser netinstall-add + ntp-dinit (KDE install, clock)
Relates to Antergos-NeXT/antergos-iso#14 (online install had no KDE session; SDDM showed nothing). Root cause: we run TWO packagechooser instances (DE chooser + DM chooser), both with method: netinstall-add. Upstream Calamares tags all netinstall data with the same hardcoded "packageChooser" source string, so when the second instance (packagechooser@dm) wrote its groups it pruned EVERYTHING tagged packageChooser from global storage - including the DE's groups. KDE never reached packageOperations, so Plasma was never installed. Fix: tag each instance's netinstall data with its own instance id (packagechooser@de / packagechooser@dm, via m_defaultId) and prune using that same id. Each chooser now only removes its own stale data and the other instance's groups survive the merge. Version: CALAMARES_VERSION 3.4.2 -> 3.4.2-w0k3 (BREATHTAKING). Shows in About dialog, --version and libcalamares. pkgrel 8 -> 9, local makepkg build of 3.4.2-9 verified clean. Also add ntp-dinit to Init Services group in netinstall.yaml, so the service exists on the installed system (relates to Antergos-NeXT/antergos-iso#13).
This commit is contained in:
@@ -79,6 +79,7 @@
|
|||||||
- dhcpcd-dinit
|
- dhcpcd-dinit
|
||||||
- syslog-ng-dinit
|
- syslog-ng-dinit
|
||||||
- power-profiles-daemon-dinit
|
- power-profiles-daemon-dinit
|
||||||
|
- ntp-dinit
|
||||||
|
|
||||||
- name: "Utilities"
|
- name: "Utilities"
|
||||||
description: "System Utilities"
|
description: "System Utilities"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
_pkgname="calamares"
|
_pkgname="calamares"
|
||||||
pkgname="$_pkgname"
|
pkgname="$_pkgname"
|
||||||
pkgver=3.4.2
|
pkgver=3.4.2
|
||||||
pkgrel=8
|
pkgrel=9
|
||||||
pkgdesc="Distribution-independent installer framework"
|
pkgdesc="Distribution-independent installer framework"
|
||||||
url="https://codeberg.org/Calamares/calamares"
|
url="https://codeberg.org/Calamares/calamares"
|
||||||
license=("GPL-3.0-or-later")
|
license=("GPL-3.0-or-later")
|
||||||
@@ -29,8 +29,15 @@ makedepends=(
|
|||||||
|
|
||||||
_pkgext="tar.gz"
|
_pkgext="tar.gz"
|
||||||
DLAGENTS=('https::/usr/bin/curl -gqb "" -fLC - --http1.1 --retry 5 --retry-delay 5 -o %o %u')
|
DLAGENTS=('https::/usr/bin/curl -gqb "" -fLC - --http1.1 --retry 5 --retry-delay 5 -o %o %u')
|
||||||
source=("$_pkgname-$pkgver.$_pkgext"::"$url/releases/download/v$pkgver/$_pkgname-$pkgver.$_pkgext")
|
source=("$_pkgname-$pkgver.$_pkgext"::"$url/releases/download/v$pkgver/$_pkgname-$pkgver.$_pkgext"
|
||||||
sha256sums=('733bbbb00dc9f84874bd5c22960952f317ea2537565431179fa2152b2fbfdccc')
|
'multi-netinstall-add.patch')
|
||||||
|
sha256sums=('733bbbb00dc9f84874bd5c22960952f317ea2537565431179fa2152b2fbfdccc'
|
||||||
|
'18a0e1592b0f893256996f6071d539cbd692b920b4d3788e043442f3e707d795')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir/$_pkgname-$pkgver"
|
||||||
|
patch -Np1 -i "$srcdir/multi-netinstall-add.patch"
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local _skip_modules=(
|
local _skip_modules=(
|
||||||
|
|||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index d393726..6f6a5f4 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -51,7 +51,7 @@
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
||||||
|
|
||||||
|
-set(CALAMARES_VERSION 3.4.2)
|
||||||
|
+set(CALAMARES_VERSION 3.4.2-w0k3)
|
||||||
|
set(CALAMARES_RELEASE_MODE ON) # Set to ON during a release
|
||||||
|
|
||||||
|
if(CMAKE_SCRIPT_MODE_FILE)
|
||||||
|
diff --git a/src/modules/packagechooser/Config.cpp b/src/modules/packagechooser/Config.cpp
|
||||||
|
index 642311b..d0d6b11 100644
|
||||||
|
--- a/src/modules/packagechooser/Config.cpp
|
||||||
|
+++ b/src/modules/packagechooser/Config.cpp
|
||||||
|
@@ -147,7 +147,12 @@ Config::updateGlobalStorage( const QStringList& selected ) const
|
||||||
|
}
|
||||||
|
else if ( m_method == PackageChooserMethod::NetAdd )
|
||||||
|
{
|
||||||
|
- QVariantList netinstallDataList = m_model->getNetinstallDataForNames( selected );
|
||||||
|
+ // Tag the data with our own instance id (e.g. "packagechooser@de")
|
||||||
|
+ // so that when multiple packagechooser instances use netinstall-add,
|
||||||
|
+ // each instance only prunes (and replaces) its own stale data and
|
||||||
|
+ // leaves the other instances' groups intact in global storage.
|
||||||
|
+ const QString source = m_defaultId.toString();
|
||||||
|
+ QVariantList netinstallDataList = m_model->getNetinstallDataForNames( selected, source );
|
||||||
|
if ( netinstallDataList.isEmpty() )
|
||||||
|
{
|
||||||
|
cWarning() << "No netinstall information found for " << selected;
|
||||||
|
@@ -158,8 +163,7 @@ Config::updateGlobalStorage( const QStringList& selected ) const
|
||||||
|
auto* gs = Calamares::JobQueue::instance()->globalStorage();
|
||||||
|
if ( gs->contains( "netinstallAdd" ) )
|
||||||
|
{
|
||||||
|
- netinstallDataList
|
||||||
|
- += pruneNetinstallAdd( QStringLiteral( "packageChooser" ), gs->value( "netinstallAdd" ) );
|
||||||
|
+ netinstallDataList += pruneNetinstallAdd( source, gs->value( "netinstallAdd" ) );
|
||||||
|
}
|
||||||
|
gs->insert( "netinstallAdd", netinstallDataList );
|
||||||
|
}
|
||||||
|
diff --git a/src/modules/packagechooser/PackageModel.cpp b/src/modules/packagechooser/PackageModel.cpp
|
||||||
|
index f2a0b43..b7e2996 100644
|
||||||
|
--- a/src/modules/packagechooser/PackageModel.cpp
|
||||||
|
+++ b/src/modules/packagechooser/PackageModel.cpp
|
||||||
|
@@ -137,7 +137,7 @@ PackageListModel::getInstallPackagesForNames( const QStringList& ids ) const
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantList
|
||||||
|
-PackageListModel::getNetinstallDataForNames( const QStringList& ids ) const
|
||||||
|
+PackageListModel::getNetinstallDataForNames( const QStringList& ids, const QString& sourceId ) const
|
||||||
|
{
|
||||||
|
QVariantList l;
|
||||||
|
for ( auto& p : m_packages )
|
||||||
|
@@ -147,7 +147,7 @@ PackageListModel::getNetinstallDataForNames( const QStringList& ids ) const
|
||||||
|
if ( !p.netinstallData.isEmpty() )
|
||||||
|
{
|
||||||
|
QVariantMap newData = p.netinstallData;
|
||||||
|
- newData[ "source" ] = QStringLiteral( "packageChooser" );
|
||||||
|
+ newData[ "source" ] = sourceId;
|
||||||
|
l.append( newData );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/modules/packagechooser/PackageModel.h b/src/modules/packagechooser/PackageModel.h
|
||||||
|
index ed7ffcf..7c63647 100644
|
||||||
|
--- a/src/modules/packagechooser/PackageModel.h
|
||||||
|
+++ b/src/modules/packagechooser/PackageModel.h
|
||||||
|
@@ -118,7 +118,7 @@ public:
|
||||||
|
*
|
||||||
|
* returns a list of netinstall data or an emply list if none is found
|
||||||
|
*/
|
||||||
|
- QVariantList getNetinstallDataForNames( const QStringList& ids ) const;
|
||||||
|
+ QVariantList getNetinstallDataForNames( const QStringList& ids, const QString& sourceId ) const;
|
||||||
|
|
||||||
|
enum Roles : int
|
||||||
|
{
|
||||||
Reference in New Issue
Block a user