diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index 10bfe325b73..3423e86e8f3 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -95,11 +95,6 @@ function prepareDebPackage(arch) { const postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' }) .pipe(replace('@@NAME@@', product.applicationName)) - .pipe(replace('@@ARCHITECTURE@@', debArch)) - .pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@')) - .pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@')) - .pipe(replace('@@REPOSITORY_NAME@@', arch === 'x64' ? 'vscode' : 'code')) - .pipe(replace('@@SUPPORTED_ARCHITECTURES@@', arch === 'x64' ? 'amd64' : 'amd64,arm64,armhf')) .pipe(rename('DEBIAN/postinst')); const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, workspaceMime, icon, bash_completion, zsh_completion, code); diff --git a/resources/linux/debian/postinst.template b/resources/linux/debian/postinst.template index ef1b7d56810..c440312f331 100755 --- a/resources/linux/debian/postinst.template +++ b/resources/linux/debian/postinst.template @@ -66,13 +66,16 @@ NdCFTW7wY0Fb1fWJ+/KTsC4= if [ ! -f $CODE_SOURCE_PART ]; then # Write source list if it does not exist WRITE_SOURCE=1 - elif grep -q "# disabled on upgrade to" /etc/apt/sources.list.d/vscode.list; then + elif grep -Eq "http:\/\/packages\.microsoft\.com\/repos\/vscode" $CODE_SOURCE_PART; then + # Migrate from old repository + WRITE_SOURCE=1 + elif grep -q "# disabled on upgrade to" $CODE_SOURCE_PART; then # Write source list if it was disabled by OS upgrade WRITE_SOURCE=1 fi if [ "$WRITE_SOURCE" -eq "1" ]; then echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. -deb [arch=@@SUPPORTED_ARCHITECTURES@@] http://packages.microsoft.com/repos/@@REPOSITORY_NAME@@ stable main" > $CODE_SOURCE_PART +deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main" > $CODE_SOURCE_PART fi fi